{% extends 'CaisseBundle::layout.html.twig' %} 
{% block body %} 
<div id="body_section">
    <div id="body_section_inner">
        <div class="contentPageWrapper">

            <!-- register form -->
            <div class="pageSectionMain ui-corner-all">
                <div class="pageSectionMainInternal">
                    <div id="pageHeader">
                        <h2>Commandes en cours</h2>
                    </div>
                    <div>
                        <script>
                            $(document).ready(function() {
                                $('#fileData').dataTable({
                                    "aLengthMenu": [[10, 25, 50, 100, -1], [10, 25, 50, 100, "All"]],
                                    "sPaginationType": "full_numbers",
                                    "aaSorting": [[1, "desc"]],
                                    "iDisplayLength": 10,
                                    "bJQueryUI": true,
                                    "sDom": '<"H"frlT>t<"F"ip>',
                                    //<"H"T><"clear">
                                    //"sDom": '<"top"i>rt<"bottom"flp><"clear">',

                                    "oTableTools": {
                                        "aButtons": [
                                            // "copy",
                                            "csv",
                                            "xls",
                                            {
                                                "sExtends": "pdf",
                                                "sPdfOrientation": "landscape",
                                                "sPdfMessage": ""
                                            },
                                            "print"
                                        ]
                                    },
                                    "aoColumns": [
                                        {"bSortable": false},
                                        null,
                                        null,
                                        null,
                                        null,
                                        null,
                                        {"bSortable": false}
                                    ]

                                });

                            });

                        </script>

                        <p class="introText">
                         <span style="color:#F00;">Soyez très prudent lors de la suppression d'une commande.cette opération est irréversible</span>
                            <br/>
                        </p> 
                    </div>
                    <div class="clear"><!-- --></div>

                    <div>
                        <p class="introText">
                        <table id="fileData" width="100%" cellpadding="3" cellspacing="0">
                              <thead>
                            <th style="width: 40px; text-align: left;" class="ui-state-default">Date</th>
                            <th style="width: 120px; text-align: left;" class="ui-state-default">N°Cde</th>
                       
                            <th style="width: 120px; text-align: center;" class="ui-state-default">Type payment</th>
                            <th style="width: 100px; text-align: center;" class="ui-state-default">Prix total</th>
                            <th style="width: 110px; text-align: center;" class="ui-state-default">Serveur</th>
                            <th style="width: 60px; text-align: center;" class="ui-state-default" id="task">Action</th>
                           
                            <tbody>
                                {% for commande in commandes %}
                                <tr>
                                    <td class="txtLeft">{{commande.date}}</td>                      
                                    <td class="txtLeft">{{commande.numCde}}</td>
                         
                                    <td class="txtCenter">{{commande.typePayment}}</td>
                                    <td class="txtCenter">{{commande.prixTotal}}</td>
                                    <td class="txtCenter">{{commande.serveur}}</td>
                                    <td class="txtCenter" id="task1">
                                       <a href="#" onClick="return confirm(\''.$LANG['alert_pr_del'].'\');">
                                            <img src="/img/delete.png" width="16" height="16" title="Supprimer la cmde" style="margin:1px;"/>
                                        </a>
                                    </td> 
                                </tr>
                                {%endfor%}
                            </tbody>
                        </table>
                        </p>
                        <div class="clear"></div>
                    </div>
                </div>
            </div>
            <div class="clear"><!-- --></div>
        </div>

        <div class="clr"></div>

    </div>
    <div class="clear"></div>

</div>



	
        

      

{% endblock body %}